<table width="100%" border="1" cellspacing="5" cellpadding="5" class="tbl_border">
  <tr>
    <td bgcolor="#3399FF">&nbsp;</td>
    <td width="23%" align="center" bgcolor="#3399FF"><?php if($leveling == 1){?><a href="index.php?page=add_user"><img src="assets/image/add_btn.png" width="50" height="51" alt="Add" /></a><?php } ?></td>
  </tr>
  <tr>
    <td colspan="2"><table width="100%" border="1" cellspacing="4" cellpadding="4" class="tbl_border">
      <tr>
        <td width="4%" align="center" bgcolor="#333333" class="judul">#</td>
        <td width="22%" align="center" bgcolor="#333333" class="judul">Username</td>
		<td width="22%" align="center" bgcolor="#333333" class="judul">Owner</td>
        <td width="9%" align="center" bgcolor="#333333">Level</td>
        <td width="6%" align="center" bgcolor="#333333">Status</td>
        <td width="7%" align="center" bgcolor="#333333" class="judul">Config</td>
      </tr><?php
$kueri = mysql_query("select * from tbl_user ORDER BY username ASC");
$kueri_row = mysql_num_rows($kueri);
//echo $kueri_row;
if($kueri_row == 0){
?>
	<tr>
        <td>-</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
        <td>-</td>
		<td>-</td>
      </tr>
<?php
}else{
	$no=0;
	$setrip = "&nbsp;-&nbsp;";
	while($data = mysql_fetch_array($kueri))
	{
		$no++;
		if($no%2){
			$pelangi = "class=\"ganjil\"";	
		}else{
			$pelangi = "class=\"genap\"";	
		}
	?>
		<tr <?=$pelangi;?>>
		  <td align="center"><?=$no;?></td>
		  <td align="center"><?=$data['username'];?></td>
		  <td align="center"><?=$data['nama'];?></td>
		  <td align="center">
		  <?php
		  if($data['level'] == "1"){
			echo "ADMIN";  
		  }elseif($data['level'] == "2"){
			echo "GM";
		  }elseif($data['level'] == "3"){
			echo "GUEST";
		  }else{
			echo"ERROR";  
		  }	
		  ?>
		  </td>
		  <td align="center">
		  <?php
		  if($data['status'] == "1"){
			echo "Active";  
		  }elseif($data['status'] == "2"){
			echo "Deactive";
		  }else{
			echo"ERROR";  
		  }	
		  ?>
		  </td>
		  <td align="center"><?php if($leveling == 1){?><a href="index.php?page=edit_user&&id=<?=$data['id_user'];?>">Edit</a><br /><a href="delete_user.php?id=<?=$data['id_user']; ?>">Delete</a><?php } ?></td>
		</tr>
		<?php
	}
}
	?>
    </table></td>
  </tr>
</table>
